@Override
	public Integer push(Integer item) throws FullStackException {
		if(this.size() >= this.arrStack.length )throw new FullStackException();;
		if (item == null)
			return null;
		this.arrStack[this.top] = item;
		this.top++;
		return item;          

	}

	@Override
	public Integer pop() throws EmptyStackException {
		if(this.empty()) throw new EmptyStackException();
		if (this.arrStack[top-1] == null)
			return null;
		this.top--;
		return this.arrStack[top];
	}

	@Override
	public Integer peek()throws EmptyStackException {
		if (top == 0)
			throw new EmptyStackException();
		int number = 0;
		for (int i = 0; i < this.arrStack.length; i++) {
			if (this.arrStack[i] != null)
				number++;
		}
		if (number != this.top)
			return this.arrStack[this.top - 1];
		for (int i = 0; i < this.arrStack.length; i++) {
			if (this.arrStack[i] == null)
				return this.arrStack[this.top - 1];
		}
		return this.arrStack[this.top - 1];
	}
